package com.chen.deskclock.ScheduleManagement;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.chen.deskclock.R;
import com.chen.deskclock.WheelView;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class StartPage3 extends AppCompatActivity {
    private WheelView wheelView;
    private List<String> datalist=new ArrayList<String>(Arrays.asList("周一至周五","每天","法定工作日"));

    private Button btn1;
    private Button btn2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start_page3);
        wheelView=findViewById(R.id.wheelview);
        wheelView.setItems(datalist);
        wheelView.setSeletion(1);
        wheelView.setOnWheelViewListener(new WheelView.OnWheelViewListener());
        btn1=findViewById(R.id.back_step);
        btn2=findViewById(R.id.continue_step);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

        btn2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.setClass(StartPage3.this, StartPage4.class);
                startActivity(intent);
            }
        });
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                return true;
        }
        return false;
    }
}